#include<bits/stdc++.h>
#include<iostream>
#include<vector>
using namespace std;
typedef long long ll;
#define rep(i, f, t) for(int i = f; i <= t; i ++)
#define urep(i, f, t) for(int i = f; i >= t; i --)
#define pb push_back
#define pq priority_queue
#define addr(v) v.begin(), v.end()
#define uaddr(v) v.rbegin(), v.rend()
#define mft(it) it -> first
#define msd(it) it -> second
#define qstream std::ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); 
const ll INF=1e18 + 7;
const int maxn = 1e5 + 10;
const int mod = 80112002;

int t, n;
ll cnt[1005] = {1, 4, 4, 12, 9};

int main() {
	cin >> n;
	rep(i, 5, n) {
		if(i % 2) cnt[i] += (i / 2 + 1) * 4 + cnt[i - 2];
		else cnt[i] =(i+1)*(i+1)-cnt[i-1];
	}
	cout << cnt[n] << endl;
	
	return 0;
}
